import re

html = """
<div class="panel">
    <div class="panel-heading">
        <h3 class="panel-title">
            iPhone X 全新升级
        </h3>
    </div>
    <div class="panel-body">
        <a href="https://github.com/">
            <img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png">
            <span class="label label-primary">GitHub</span>
        </a>
    </div>
"""

result = re.search(r'<h3 class="panel-title">(.*?)</h3>',html,re.S)
print(result.group(1).strip())